package com.todo.reward.infrastructure.repository;


import com.todo.reward.common.enums.CouponWOWriteOffEnum;
import com.todo.reward.infrastructure.entity.po.RewardCouponWORecordPO;

/**
 * @author azhebuxing
 * @date 2025/2/12 22:20
 * @description
 */
public interface RewardCouponWORecordRepository {

    /**
     * 插入优惠券核销记录
     *
     * @param rewardCouponWORecordPO
     * @return
     */
    Boolean insertRewardCouponWORecordPO(RewardCouponWORecordPO rewardCouponWORecordPO);

    /**
     * 更新优惠券核销记录
     *
     * @param rewardCouponWORecordPO
     * @return
     */
    Boolean updateRewardCouponWORecordPO(RewardCouponWORecordPO rewardCouponWORecordPO);

    /**
     * 根据主键删除优惠券核销记录
     *
     * @param id
     * @return
     */
    Boolean removeRewardCouponWORecordPOById(Long id);

    /**
     * 根据主键查询优惠券核销记录
     *
     * @param id
     * @return
     */
    RewardCouponWORecordPO queryRewardCouponWORecordPOById(Long id);

    /**
     * 根据核销记录id查询优惠券核销记录
     *
     * @param dispatchRecordId
     * @return
     */
    RewardCouponWORecordPO queryRewardCouponWORecordPOByDispatchRecordId(Long dispatchRecordId);

    /**
     * 根据核销唯一标识查询优惠券核销记录
     *
     * @param writeOffUk
     * @return
     */
    RewardCouponWORecordPO queryRewardCouponWORecordPOByWriteOffUk(String writeOffUk);

    /**
     * 更新优惠券核销记录核销类型
     *
     * @param id
     * @param oldWriteOffType
     * @param newWriteOffType
     * @return
     */
    Boolean updateRecordWriteOffTypeById(Long id, CouponWOWriteOffEnum oldWriteOffType, CouponWOWriteOffEnum newWriteOffType);


}
